package com.yilin.tms.capital.mapper;

import com.yilin.tms.core.entity.data.statistics.StatisticsTrends;
import com.yilin.tms.core.entity.data.statistics.capital.CapitalStatistics;
import com.yilin.tms.core.entity.user.account.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface StatisticsMapper{

    Map<String, Object> getCapitalFundStatistics(@Param("loginUser") Account loginUser);

    Map<String, Double> getTradeInoutData(@Param("loginUser") Account loginUser,@Param("startTime")  String startTime, @Param("endTime") String endTime);

    /**
     * 获取资金收入和支出的总计、年、月、日金额
     */
    CapitalStatistics getCapitalCount(@Param("loginUser") Account loginUser);

    /**
     * 资金收入趋势折线图
     */
    List<StatisticsTrends> getCapitalIncomeTrends(@Param("loginUser") Account loginUser);

    /**
     * 资金支出趋势折线图
     */
    List<StatisticsTrends> getCapitalExpenditureTrends(@Param("loginUser") Account loginUser);
}
